﻿//Copyright (c) Microsoft Corporation.  All rights reserved.

using Microsoft.ApplicationServer.Caching;
using Microsoft.Ted.Wacel.Base;
using Microsoft.Ted.Wacel.Cache;
using System;

namespace Microsoft.Ted.Wacel.Cache
{
    public class Cube:Base.Cube
    {
        public Cube(string name)
            : base(name,
                 new MasterDetails<string, string>(name + "batches",
                    new WindowsAzureCacheDataProvider(new DataCache(), name + "batches") {Configuration = new WindowsAzureCacheConfiguration()},
                    new WindowsAzureCachLockProvider(new DataCache(), name + "batchlocks")),
                new WindowsAzureCacheDataProvider(new DataCache(), name) {Configuration = new WindowsAzureCacheConfiguration()},
                new WindowsAzureCachLockProvider(new DataCache(), name))
        {

        }
        public static Cube SimpleCube
        {
            get
            {
                Cube ret = new Cube("SimpleCube");
                ret.AddDimension(Dimension.GetTimeDimensionMonthDays(DateTime.Now.Year));
                return ret;
            }
        }
    }
}
